LPDIRECTDRAWSURFACE4 create_surface(int w, int h, DWORD caps, DWORD flags);
int draw_ok(HRESULT result);
void clear(LPDIRECTDRAWSURFACE4 buf, int color = 0);
void rotated_blit(LPDIRECTDRAWSURFACE4 dest, RECT *destrect, LPDIRECTDRAWSURFACE4 src, int x, int y, fix angle, fix scale);
void rotated_blit16(LPDIRECTDRAWSURFACE4 dest, RECT *destrect, LPDIRECTDRAWSURFACE4 src, int x, int y, fix angle, fix scale);
void rotated_blit24(LPDIRECTDRAWSURFACE4 dest, RECT *destrect, LPDIRECTDRAWSURFACE4 src, int x, int y, fix angle, fix scale);
void rotated_blit32(LPDIRECTDRAWSURFACE4 dest, RECT *destrect, LPDIRECTDRAWSURFACE4 src, int x, int y, fix angle, fix scale);
void rotated_colormapped_blit(LPDIRECTDRAWSURFACE4 dest, RECT *destrect, LPDIRECTDRAWSURFACE4 src, int x, int y, fix angle, fix scale, char *colormap);
void colormapped_blit(LPDIRECTDRAWSURFACE4 dest, RECT *destrect, LPDIRECTDRAWSURFACE4 src, RECT *srcrect, char *colormap);
void gravity_blit(LPDIRECTDRAWSURFACE4 dest, RECT *destrect, int x, int y, short *gravity_map);